'use strict';

const conn = require('../../libs/Conn');
const util = require('../../libs/Utils');

module.exports = async function (params) {
    let insertObj = {
        unit_id:util.uuid(),
        unit_type:params.unit_type,
        unit_name:params.unit_name,
        enable:params.enable,
        delete_sign:1
    };
    let sql = 'INSERT INTO unit_file SET ?;';
    await conn(sql, [insertObj]);
    return {success: true};
};